<template>
  <i class="beta-portfolio" title="搜索组合" @click="show = !show">搜组合</i>
  <vue-modal
    title="搜组合"
    ok-text="搜索"
    cancel-text="取消"
    :show.sync="show"
    effect="fade"
    :small="true"
    :width="460"
    :callback="submit">
    <div slot="modal-body" class="modal-body">
      <form class="text-left" role="form" v-el:form>
        <input type="text" class="form-control input-sm" placeholder="键入搜索关键字" v-model="form.name" @input="submit | debounce 500">
      </form>
      <div class="text-left search-result" v-if="list.length">
        <table class="table table-bordered table-hover">
          <thead>
            <tr>
              <th class="col-sm-4">组合ID</th>
              <th class="col-sm-6">组合名称</th>
            </tr>
          </thead>
          <tbody>
            <tr v-for="it in list">
              <td>{{it.betaId}}</td>
              <td>{{it.name}}</td>
            </tr>
          </tbody>
        </table>
      </div>
    </div>
  </vue-modal>
</template>
<style src="./modal-search-portfolio.css" scoped></style>
<script src="./modal-search-portfolio.js"></script>